package ex1.game;
public enum Action
{
	Cooperate(false), Deffect(true);

	private boolean _bit;

	private Action(boolean bit) { _bit = bit; }
	
	public boolean getBit() { return _bit; }
	
	public static Action getAction(boolean bit)
	{
		if(bit == Action.Cooperate.getBit())
		{
			return Action.Cooperate;
		}
		else if(bit == Action.Deffect.getBit())
		{
			return Action.Deffect;
		}
		
		throw new Error("Fault!!");
	}
	
}